<?php
if(!defined('PATH')) exit();
?>
<?php
if (!$news->isLoaded()) {
	$this->archez->showMsg('This news does not exist.<span style="float:right;"><a href="' . PATH . '/news/">go back</a></span>', 'error');
} else {
?>
<h1><?=$news->title?></h1>
<?=nl2br($news->body)?><br/><br/>
<h2>Comments</h2>
<?php
	if (!$commentList->isLoaded()) {
		$this->archez->showMsg('This news hasn\'t got any comments.<span style="float:right;"><a href="' . PATH . '/news/">go back</a></span>', 'error');
	} else {
		$player = $this->ots->createObject('Player');
		while ($comment = $commentList->next()) {
			$player->load($comment->author)
?>
<h3><?=date($this->config['website']['date_format'], $comment->time)?> by <a href="<?=PATH?>/search/check/<?=urlencode($player->getName())?>"><?=$player->getName()?></a></h3>
<?=nl2br($comment->body)?><br/>
<?php
		}
	}
?>
<?php
}
?>